<?php echo $this->Session->flash(); ?>
<div id="loading" style="display: none;">
    <?php echo $html->image('loading.gif', array('border' => "0", 'align' => 'center')); ?>
</div>
<h1>PROPIETARIOS</h1>
<table  id="tabla" class="tabla" >
    <thead>
        <tr>
            <th>Predio</th>
            <th>Nombres</th>
            <th>Primer Apellido</th>
            <th>Segundo apellido</th>
            <th>Identificación</th>
            <th>Opciones</th>
        </tr>
    </thead>
    <tbody>
        <?php foreach ($owners as $own): ?>
            <tr>
                <td><?php echo $own['Property']['codigo'] ?></td>
                <td><?php echo $own['Owner']['nombres'] ?></td>
                <td><?php echo $own['Owner']['primer_apellido'] ?></td>
                <td><?php echo $own['Owner']['segundo_apellido'] ?></td>
                <td><?php echo $own['Owner']['documento'] ?></td>
                <td><?php echo $ajax->link('Editar', array('Controller' => 'owners', 'action' => 'edit', $own['Owner']['id']), array('update' => 'content', 'complete' => 'cargar()', 'indicator' => 'loading')); ?></td>
            </tr>
        <?php endforeach; ?>
    </tbody>
</table>
<br><?php echo $ajax->link('Adicionar ', array('Controller' => 'owners', 'action' => 'add', $id), array('update' => 'content', 'complete' => 'cargar()', 'indicator' => 'loading')); ?>
<br><br><br>
<br>
<?php
if (is_null($proyect_id))
    echo $ajax->link($html->image('regresar.gif', array('width' => '30', 'heigth' => '30', 'alt' => 'Regresar', 'title' => 'regresar')), array('controller' => 'Properties', 'action' => 'index'), array('update' => 'content', 'complete' => 'cargar()', 'indicator' => 'loading', 'escape' => false));
else
    echo $ajax->link($html->image('regresar.gif', array('width' => '30', 'heigth' => '30', 'alt' => 'Regresar', 'title' => 'regresar')), array('controller' => 'Properties', 'action' => 'initial_evaluation_index'), array('update' => 'lista_predios', 'indicator' => 'loading', 'escape' => false));
?>
<br>